<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-04 17:34:56
 * @LastEditTime: 2021-10-19 11:37:29
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/subpackage/axq/pages/article/_id.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <view class="article-info">
    <view class="title">{{ black_Get(articleInfo,'title') }}</view>
    <view class="time">{{ black_Get(articleInfo,'createTime') }}</view>
    <view class="content">
      <uParse :content="articleInfo.content" :noData="noData"></uParse>
    </view>
    <a-logo type="text"></a-logo>
  </view>
</template>

<script>
import uParse from '@/components/gaoyia-parse/parse'
import {
  model
} from '@/model';

const {
  AxqArticle
} = model.collection;
export default {
  components: {
    uParse
  },
  data () {
    return {
      articleInfo: {},
      noData: '<div style="text-align:center;">~暂无相关报道~</div>'
    }
  },
  onLoad (options) {
    this.id = options.id
    this.getArticleInfo()
  },
  methods: {
    getArticleInfo () {
      AxqArticle.sendApi('articleInfo', {
        params: {},
        data: {
          query: {
            id: this.id
          }
        }
      }).then(res => {
        const {
          status,
          data
        } = res;
        if (status) {
          this.articleInfo = data;
        }
      })
    },
  }
}
</script>

<style lang="less">
.article-info {
  padding: 20rpx;
  background-color: #f7f7f7;
  height: 100vh;

  .title {
    font-size: 40rpx;
    font-weight: bold;
    color: #000;
    line-height: 48rpx;
  }

  .time {
    margin-top: 35rpx;
    font-size: 26rpx;
    color: #999;
    line-height: 40rpx;
  }
}
</style>